package com.xfsg.core.operationlog.annotation;

import com.xfsg.core.operationlog.support.LogRecordConfigureSelector;
import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * @Classname EnableOperationLogRecord
 * @Description TODO
 * @date 2022/1/19 20:58
 * @author ZhangYi
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(LogRecordConfigureSelector.class)
public @interface EnableOperationLogRecord {

    String tenant() default "";

    /**
     * 服务名
     * @return
     */
    String serviceId() default "";

    /**
     * Indicate how caching advice should be applied. The default is
     * {@link AdviceMode#PROXY}.
     *
     * @return 代理方式
     * @see AdviceMode
     */
    AdviceMode mode() default AdviceMode.PROXY;
}
